from project import *
from person import *
from keyexpression import *
from Tkinter import *
from tkSimpleDialog import *

class ProjectMembersFrame(Frame):
    """
    Represents the frame that provides a user interface to access project information.
    """
    
    def __init__(self, parentControl, listener):
        Frame.__init__(self, parentControl)
        self.listener = listener
        
        self.member= Label(self, text="Membres (un par ligne): ").pack()

        self.allMembers = Text(self, width=40, height=15)
        self.allMembers.pack()
        
        button = Button(self, text="Sauvegarder", command=self.save)
        button.pack()
        
    def save(self):
        self.listener.saveMembers(self.allMembers.get(1.0, END))
 
            
    
if __name__ == "__main__":
    root = Tk()
    client = Client()
    project = client.createProject("Foo", "Bar", "Frob")
    frame = ProjectMembersFrame(root, project, client)
    root.mainloop()